package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.AdAdvertisingMapper;
import com.ruoyi.bussiness.domain.AdAdvertising;
import com.ruoyi.bussiness.service.IAdAdvertisingService;
import com.ruoyi.common.core.text.Convert;

/**
 * 广告信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class AdAdvertisingServiceImpl implements IAdAdvertisingService 
{
    @Autowired
    private AdAdvertisingMapper adAdvertisingMapper;

    /**
     * 查询广告信息
     * 
     * @param id 广告信息主键
     * @return 广告信息
     */
    @Override
    public AdAdvertising selectAdAdvertisingById(Long id)
    {
        return adAdvertisingMapper.selectAdAdvertisingById(id);
    }

    /**
     * 查询广告信息列表
     * 
     * @param adAdvertising 广告信息
     * @return 广告信息
     */
    @Override
    public List<AdAdvertising> selectAdAdvertisingList(AdAdvertising adAdvertising)
    {
        return adAdvertisingMapper.selectAdAdvertisingList(adAdvertising);
    }

    /**
     * 新增广告信息
     * 
     * @param adAdvertising 广告信息
     * @return 结果
     */
    @Override
    public int insertAdAdvertising(AdAdvertising adAdvertising)
    {
        return adAdvertisingMapper.insertAdAdvertising(adAdvertising);
    }

    /**
     * 修改广告信息
     * 
     * @param adAdvertising 广告信息
     * @return 结果
     */
    @Override
    public int updateAdAdvertising(AdAdvertising adAdvertising)
    {
        return adAdvertisingMapper.updateAdAdvertising(adAdvertising);
    }

    /**
     * 批量删除广告信息
     * 
     * @param ids 需要删除的广告信息主键
     * @return 结果
     */
    @Override
    public int deleteAdAdvertisingByIds(String ids)
    {
        return adAdvertisingMapper.deleteAdAdvertisingByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除广告信息信息
     * 
     * @param id 广告信息主键
     * @return 结果
     */
    @Override
    public int deleteAdAdvertisingById(Long id)
    {
        return adAdvertisingMapper.deleteAdAdvertisingById(id);
    }
}
